const AUTH_CODE = [100101, 100102, 101001];

// const base = `${window.location.protocol}//${window.location.host}`;

// export const getToken = () => {
//   return localStorage.getItem(TOKEN_KEY);
// };

// export const setToken = (token: string) => {
//   localStorage.setItem(TOKEN_KEY, token);
// };

// export const clearToken = () => {
//   localStorage.removeItem(TOKEN_KEY);
// };

// export const gotoLogin = async (from = '/') => {
//   const { isSuccess, data } = await $fetch('/auth/v1/login/info', {
//     method: 'get',
//     data: {
//       redirect: `${base}${LOGIN_ROUTE_PATH}?from=${encodeURIComponent(from)}`,
//     },
//   });

//   if (isSuccess) {
//     window.location.href = data.loginUrl;
//   }
// };

export const isAuthCode = (code: number) => AUTH_CODE.includes(code);
